.user-groups-modal-create,
.user-groups-modal-update,
.view-user-groups-modal,
.user-groups-modal {
    &.modal-dialog {
        margin-top: 50px;
    }

    .modal-content {
        border-radius: 8px;

        .ad_ldap_upsell_banner {
            position: sticky;
            z-index: 4;
            right: 12px;
            bottom: 6px;
            left: 12px;
            display: flex;
            height: 44px;
            align-items: center;
            justify-content: space-between;
            padding: 12px 8px;
            border-radius: 8px;
            margin: 0 12px;
            background-color: var(--sidebar-active-border);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
            color: var(--button-color);

            .message {
                display: flex;
                gap: 8px;
            }

            .btn-container {
                display: flex;
                gap: 13px;
            }

            .banner-close {
                height: 4rem;
                border: none;
                margin-top: 0;
                background: none;
                font-size: 25px;
                font-weight: 400;
                line-height: 18px;
            }

            .ad-ldap-banner-btn {
                border: none;
                background: none;
                color: var(--button-color);
                font-size: 14px;
                font-weight: 600;
                line-height: 14px;
            }
        }

        .ad_ldap_upsell_confirm {
            position: sticky;
            z-index: 4;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            overflow: hidden;
            width: 100%;
            height: 100%;
            border-radius: 0 0 8px 8px;

            .upsell-confirm-backdrop {
                position: fixed;
                z-index: 5;
                bottom: 164px;
                width: 100%;
                height: calc(100% - 164px);
                background: rgba(0, 0, 0, 0.16);
            }

            .upsell-confirm-foreground {
                height: 148px;
                padding: 16px 32px;
                background: var(--button-color);
            }

            .title {
                color: #000;
                font-size: 14px;
                font-weight: 600;
                line-height: 20px;
            }

            .subtitle {
                color: var(--center-channel-color);
                font-size: 14px;
                font-weight: 400;
                line-height: 20px;
            }

            .btns-container {
                display: flex;
                justify-content: right;
                gap: 10px;

                .confrim-btn {
                    width: 100px;
                    height: 32px;
                    padding: 10px 16px;
                    border: none;
                    border-radius: 4px;
                    background: rgba(28, 88, 217, 0.08);
                    color: var(--button-bg);
                    font-size: 12px;
                    font-weight: 600;
                    line-height: 10px;
                }

                .learn-more {
                    background: rgba(var(--button-bg-rgb), 0.08);
                    color: var(--button-bg);
                }

                .continue {
                    background: var(--button-bg);
                    color: var(--button-color);
                }
            }
        }

        .GenericModal__header {
            display: flex;
        }
    }

    .modal-body {
        max-height: 100%;
        padding: 0;

        .no-results__wrapper {
            max-width: 350px;
            padding-bottom: 60px;
        }

        .user-groups-search {
            position: relative;
            margin: 6px 32px 8px;

            .Input_container {
                .Input_wrapper {
                    margin: 6px 0;
                    line-height: 38px;
                }

                .Input.form-control {
                    height: 34px;
                    border: none;
                    font-size: 14px;
                    line-height: 38px;
                }
            }

            .fa-search {
                position: absolute;
                top: 15px;
                left: 16px;
                color: rgba(var(--center-channel-color-rgb), 0.64);
                font-size: 16px;
                pointer-events: none;
            }
        }

        .more-modal__dropdown {
            width: 100%;
            padding: 0 32px 24px;
            border-bottom: 1px solid rgba(var(--center-channel-color-rgb), 0.08);

            #groupsFilterDropdown {
                display: inline-flex;
                padding: 6px;
                border: none;
                border-radius: 4px;
                background: none;
                line-height: 12px;

                &:hover {
                    background: rgba(var(--center-channel-color-rgb), 0.08);
                }

                &:active {
                    background: rgba(var(--button-bg-rgb), 0.08);
                }

                span {
                    color: var(--button-bg);
                    font-size: 12px;
                    line-height: 12px;
                    white-space: nowrap;
                }
            }

            .groups-filter-btn span {
                width: 100%;

                i {
                    display: flex;
                    align-items: center;
                    margin-left: auto;
                    color: var(--button-bg);
                }
            }
        }

        .user-groups-modal__content {
            overflow: auto;

            &.user-groups-list {
                position: relative;
                max-height: 460px;
                padding-top: 24px;
                padding-bottom: 16px;
                overflow-y: scroll; // for Firefox and browsers that doesn't support overflow-y:overlay property
                overflow-y: overlay;

                &::-webkit-scrollbar {
                    width: 20px;
                }

                &::-webkit-scrollbar-track {
                    background: rgba(0, 0, 0, 0);
                }

                &::-webkit-scrollbar-thumb {
                    border: 8px rgba(0, 0, 0, 0) solid;
                    border-radius: 9999px;
                    background: rgba(var(--center-channel-color-rgb), 0.24);
                    background-clip: padding-box;
                }

                .group-row {
                    display: flex;
                    align-items: center;
                    padding: 14px 32px;
                    border: none;
                    background: none;
                    line-height: 38px;

                    &:hover {
                        background: rgba(var(--center-channel-color-rgb), 0.08);
                        cursor: pointer;
                    }

                    &:active {
                        background: rgba(var(--button-bg-rgb), 0.08);
                    }

                    .group-display-name,
                    .group-name {
                        display: flex;
                        overflow: hidden;
                        max-width: 200px;
                        align-items: center;
                        gap: 8px;
                        text-overflow: ellipsis;
                        white-space: nowrap;

                        i,
                        svg {
                            color: rgba(var(--center-channel-color-rgb), 0.64);
                            font-size: 16px;
                        }
                    }

                    .group-name {
                        padding-left: 8px;
                        color: rgba(var(--center-channel-color-rgb), 0.75);
                    }

                    .group-member-count {
                        margin-right: 8px;
                        margin-left: auto;
                        color: rgba(var(--center-channel-color-rgb), 0.75);
                        font-size: 12px;
                        line-height: 16px;
                    }

                    .group-action {
                        width: 24px;

                        .MenuWrapper {
                            width: 24px;
                            margin-left: auto;

                            .Menu {
                                position: absolute;
                                border: 1px solid rgba(var(--center-channel-color-rgb), 0.16);
                                border-radius: 4px;
                                margin-top: 8px;
                            }
                        }

                        .group-actions-menu {
                            span.MenuItem__primary-text {
                                font-size: 14px;
                                line-height: 20px;
                            }
                        }
                    }

                    .group-action button.action-wrapper {
                        display: flex;
                        width: 24px;
                        height: 24px;
                        flex-direction: column;
                        align-items: center;
                        padding: 4px 6px;
                        border: none;
                        border-radius: 4px;
                        margin-left: auto;
                        background: transparent;
                        color: rgba(var(--center-channel-color-rgb), 0.75);
                        text-decoration: none;

                        &:hover {
                            border-radius: 4px;
                            background: rgba(var(--center-channel-color-rgb), 0.08);
                            color: rgba(var(--center-channel-color-rgb), 0.8);
                            fill: rgba(var(--center-channel-color-rgb), 0.8);
                        }

                        &:active {
                            background-color: rgba(var(--button-bg-rgb), 0.08);
                            color: var(--button-bg);
                        }

                        i.icon {
                            font-size: 16px;
                            line-height: 16px;
                        }
                    }

                    &:hover .group-action button.action-wrapper i {
                        display: flex;
                    }
                }

                .loading-screen {
                    position: fixed;
                    bottom: 0;
                    height: 60px;
                }
            }

            .group-mention-input-wrapper,
            .group-name-input-wrapper {
                padding: 6px 32px 12px;

                .Input_container {
                    :focus {
                        border-color: transparent;
                        box-shadow: none;
                        outline-style: none;
                    }

                    .Input_wrapper {
                        margin: 6px 0;
                        line-height: 38px;
                    }

                    .Input {
                        font-size: 14px;
                        line-height: 38px;
                    }
                }
            }

            .group-mention-input-wrapper {
                padding: 12px 32px 24px;
            }

            .group-add-people-fieldset {
                margin-top: 20px;

                legend {
                    padding: 0 32px;
                    border: none;
                    margin-bottom: 10px;
                    color: inherit;
                    font-family: Metropolis, sans-serif;
                    font-size: 18px;
                    font-weight: 600;
                    line-height: 24px;
                }
            }

            .group-add-user {
                .multi-select__wrapper {
                    margin-top: 0;
                }
            }
        }
    }
}
